gtk4.git
9 years agoport to new gtk_menu_popup_at_* () functions
William Hua [Tue, 12 Jul 2016 18:08:36 +0000 (14:08 -0400)]
port to new gtk_menu_popup_at_* () functions

https://bugzilla.gnome.org/show_bug.cgi?id=756579

9 years agoadd demo for testing gtk_menu_popup_at_* ()
William Hua [Thu, 23 Jun 2016 14:54:22 +0000 (10:54 -0400)]
add demo for testing gtk_menu_popup_at_* ()

https://bugzilla.gnome.org/show_bug.cgi?id=756579

9 years agogtkmenu: add gtk_menu_popup_at_* ()
William Hua [Tue, 14 Jun 2016 19:42:13 +0000 (15:42 -0400)]
gtkmenu: add gtk_menu_popup_at_* ()

Adds the following functions:

gtk_menu_popup_at_rect ()
gtk_menu_popup_at_widget ()
gtk_menu_popup_at_pointer ()

https://bugzilla.gnome.org/show_bug.cgi?id=756579

9 years agogdkwindow: add gdk_window_move_to_rect ()
William Hua [Wed, 15 Jun 2016 15:00:38 +0000 (11:00 -0400)]
gdkwindow: add gdk_window_move_to_rect ()

https://bugzilla.gnome.org/show_bug.cgi?id=756579

9 years agogdkwindow: store transient_for window
William Hua [Sat, 16 Jul 2016 00:52:35 +0000 (20:52 -0400)]
gdkwindow: store transient_for window

https://bugzilla.gnome.org/show_bug.cgi?id=756579

9 years agogdkwindow: store shadow sizes
William Hua [Thu, 16 Jun 2016 15:20:35 +0000 (11:20 -0400)]
gdkwindow: store shadow sizes

https://bugzilla.gnome.org/show_bug.cgi?id=756579

9 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 18 Jul 2016 14:48:16 +0000 (16:48 +0200)]
Updated Spanish translation

9 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 18 Jul 2016 14:48:06 +0000 (16:48 +0200)]
Updated Spanish translation

9 years agoTry to delete any existing W32 status icons when DPI changes
Руслан Ижбулатов [Mon, 18 Jul 2016 10:32:04 +0000 (10:32 +0000)]
Try to delete any existing W32 status icons when DPI changes

Fixes some or all of the issues reported in
https://github.com/hexchat/hexchat/issues/1423

9 years ago3.21.4
Matthias Clasen [Mon, 18 Jul 2016 03:27:35 +0000 (23:27 -0400)]
3.21.4

9 years agoUpdates
Matthias Clasen [Sun, 17 Jul 2016 18:07:47 +0000 (14:07 -0400)]
Updates

9 years agoUpdated Chinese (Taiwan) translation
Chao-Hsiung Liao [Sat, 16 Jul 2016 02:46:17 +0000 (02:46 +0000)]
Updated Chinese (Taiwan) translation

9 years agoUpdated Chinese (Taiwan) translation
Chao-Hsiung Liao [Sat, 16 Jul 2016 02:45:07 +0000 (02:45 +0000)]
Updated Chinese (Taiwan) translation

9 years agoAdd Language headers to po files
Piotr Drąg [Thu, 14 Jul 2016 15:06:21 +0000 (17:06 +0200)]
Add Language headers to po files

Future versions of gettext will fail if this header is missing.

9 years agoAdd LINGUAS file to po-properties
Javier Jardón [Wed, 13 Jul 2016 20:15:15 +0000 (21:15 +0100)]
Add LINGUAS file to po-properties

9 years agoUpdated Portuguese translation
Tiago Santos [Wed, 13 Jul 2016 16:49:10 +0000 (16:49 +0000)]
Updated Portuguese translation

9 years agoUpdated Portuguese translation
Tiago Santos [Wed, 13 Jul 2016 16:47:18 +0000 (16:47 +0000)]
Updated Portuguese translation

9 years agolink button: Use gtk_show_uri_on_window
Matthias Clasen [Wed, 13 Jul 2016 15:23:47 +0000 (11:23 -0400)]
link button: Use gtk_show_uri_on_window

This gives slightly better behavior in the sandboxed case and
makes no difference otherwise.

9 years agoGtkFileChooserNativePortal: Use correct response code for accept
Patrick Griffis [Wed, 13 Jul 2016 05:44:34 +0000 (01:44 -0400)]
GtkFileChooserNativePortal: Use correct response code for accept

As per the documentation of GtkFileChooserNative.

https://bugzilla.gnome.org/show_bug.cgi?id=768756

9 years agogtk/gtkfilechoosernativeportal.c: Don't use g_autoptr()
Chun-wei Fan [Mon, 11 Jul 2016 09:50:13 +0000 (17:50 +0800)]
gtk/gtkfilechoosernativeportal.c: Don't use g_autoptr()

This code is also built by non-GCC/CLang compilers, so use the normal
ref/unref steps for the GVariant.

https://bugzilla.gnome.org/show_bug.cgi?id=768659

9 years agoRemove a few mentions of GtkVBox in the docs
Matthias Clasen [Wed, 13 Jul 2016 01:57:46 +0000 (21:57 -0400)]
Remove a few mentions of GtkVBox in the docs

We only have GtkBox nowadays.

9 years agodocs: Fix typo.
Emmanuele Bassi [Tue, 12 Jul 2016 17:09:20 +0000 (18:09 +0100)]
docs: Fix typo.

9 years agodocs: Attempt a better explanation for gtk_widget_destroy()
Emmanuele Bassi [Tue, 12 Jul 2016 11:43:31 +0000 (12:43 +0100)]
docs: Attempt a better explanation for gtk_widget_destroy()

Clarify the nature of this function, and the expectations after it's
been called.

9 years agoplacesview: fix spelling of WebDAV in a translatable string
Piotr Drąg [Tue, 12 Jul 2016 11:31:21 +0000 (13:31 +0200)]
placesview: fix spelling of WebDAV in a translatable string

9 years agoplacesview: fix open action for locations without a mount or volume
Razvan Chitu [Tue, 12 Jul 2016 09:08:23 +0000 (12:08 +0300)]
placesview: fix open action for locations without a mount or volume

In the "Other Locations" view, locations can be opened from the context menu
based on their mount or volume. However, some locations, like "Computer", do not
have either of those so they cannot be opened from the context menu. In order to
fix this, the file associated with the location can be used as well.

https://bugzilla.gnome.org/show_bug.cgi?id=768657

9 years agodocs: Improve gdk_window_create_similar_image_surface()
Emmanuele Bassi [Mon, 11 Jul 2016 15:55:10 +0000 (16:55 +0100)]
docs: Improve gdk_window_create_similar_image_surface()

The sizes passed are in device pixels and do not take into account the
scaling factor of the window itself. We cannot change the semantics of
the function, so let's at least add a warning for this trap door.

9 years agoAdwaita: remove old popover checkbutton/radiobutton style
Lapo Calamandrei [Fri, 8 Jul 2016 22:56:32 +0000 (00:56 +0200)]
Adwaita: remove old popover checkbutton/radiobutton style

remove some now disfunctional style regarding checkbuttons and
radiobuttons inside popovers which shouldn't be needed anymore.

9 years agoAdwaita: remove some check and radio related cruft
Lapo Calamandrei [Fri, 8 Jul 2016 20:08:27 +0000 (22:08 +0200)]
Adwaita: remove some check and radio related cruft

remove superfluous padding which was there before the css node
conversion of the widget.

9 years agoUpdated POTFILES.in
Piotr Drąg [Fri, 8 Jul 2016 19:49:21 +0000 (21:49 +0200)]
Updated POTFILES.in

9 years agoFix up the documentation of GtkTextView::move-viewport
Matthias Clasen [Fri, 8 Jul 2016 14:26:22 +0000 (10:26 -0400)]
Fix up the documentation of GtkTextView::move-viewport

Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=768546

9 years agoAdd portal support to GtkPrintOperation
Matthias Clasen [Tue, 5 Jul 2016 05:36:56 +0000 (01:36 -0400)]
Add portal support to GtkPrintOperation

Make GtkPrintOperation talk to org.freedesktop.portal.Print when
running in a sandbox.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoprint job: Add api to send data from an fd
Matthias Clasen [Mon, 4 Jul 2016 04:04:38 +0000 (00:04 -0400)]
print job: Add api to send data from an fd

This will be useful for portalized print support.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agopage setup: Add api to serialize to a GVariant
Matthias Clasen [Sun, 3 Jul 2016 00:29:51 +0000 (20:29 -0400)]
page setup: Add api to serialize to a GVariant

This will be useful for portalized print support.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoAdd api to serialize a GtkPaperSize to a GVariant
Matthias Clasen [Thu, 7 Jul 2016 01:31:49 +0000 (21:31 -0400)]
Add api to serialize a GtkPaperSize to a GVariant

This will be useful in portalized printing.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoprint settings: Add api to serialize to a GVariant
Matthias Clasen [Sun, 3 Jul 2016 00:29:08 +0000 (20:29 -0400)]
print settings: Add api to serialize to a GVariant

This will be useful for portalized print support.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoSupport the Inhibit portal
Matthias Clasen [Sat, 2 Jul 2016 01:19:12 +0000 (21:19 -0400)]
Support the Inhibit portal

xdg-desktop-portal now has a portal for inhibiting session status
changes. We don't need to use it if we can talk to the session
manager, but if can't, try org.freedesktop.portal.Inhibit.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoImplement combobox apis for GtkFileChooserNativePortal
Matthias Clasen [Wed, 6 Jul 2016 02:13:22 +0000 (22:13 -0400)]
Implement combobox apis for GtkFileChooserNativePortal

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoImplement combobox apis in GtkFileChooserWidget
Matthias Clasen [Wed, 6 Jul 2016 02:11:44 +0000 (22:11 -0400)]
Implement combobox apis in GtkFileChooserWidget

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoGtkFileChooser: Add abstract api for comboboxes and checkbuttons
Matthias Clasen [Wed, 6 Jul 2016 02:09:56 +0000 (22:09 -0400)]
GtkFileChooser: Add abstract api for comboboxes and checkbuttons

This commit adds API for adding combo boxes and check buttons to
GtkFileChooser, and getting the selected value back in ::response.

In contrast to gtk_file_chooser_set_extra_widget, these APIs are
abstract and suitable for implementation in GtkFileChooserNative.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoAdapt to simplified file chooser portal api
Matthias Clasen [Wed, 6 Jul 2016 16:54:29 +0000 (12:54 -0400)]
Adapt to simplified file chooser portal api

OpenFiles is gone, just set the 'multiple' option instead.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agofile chooser portal: Port to new Request API
Matthias Clasen [Sun, 26 Jun 2016 18:35:12 +0000 (14:35 -0400)]
file chooser portal: Port to new Request API

The portal API has changed, we need to adapt.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoUse the portal when sandboxed
Matthias Clasen [Sat, 11 Jun 2016 14:23:27 +0000 (10:23 -0400)]
Use the portal when sandboxed

Use the sandbox helper api to find out whether to use
the file chooser portal.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoportal: Sent more data along
Matthias Clasen [Sat, 11 Jun 2016 05:30:50 +0000 (01:30 -0400)]
portal: Sent more data along

Send the current_name, current_folder or current_file fields to
the portal.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoportal: Send file filters to the portal
Matthias Clasen [Sat, 11 Jun 2016 04:46:12 +0000 (00:46 -0400)]
portal: Send file filters to the portal

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoAdd api to serialize GtkFileFilter to a variant
Matthias Clasen [Sat, 11 Jun 2016 04:45:27 +0000 (00:45 -0400)]
Add api to serialize GtkFileFilter to a variant

This will be used to send filters over D-Bus in future commits.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoInitial version of file chooser portal support
Alexander Larsson [Wed, 11 Nov 2015 15:31:53 +0000 (16:31 +0100)]
Initial version of file chooser portal support

Implement GtkFileChooserNative for sandboxed applications
by talking to org.freedesktop.portal.FileChooser. Currently,
this supports OPEN and SAVE mode.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoabout dialog: Use gtk_show_uri_on_window
Matthias Clasen [Tue, 5 Jul 2016 12:04:13 +0000 (08:04 -0400)]
about dialog: Use gtk_show_uri_on_window

This allows us to handle things slightly better in
the portal case.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoAdd gtk_show_uri_on_window
Matthias Clasen [Sat, 18 Jun 2016 21:59:40 +0000 (17:59 -0400)]
Add gtk_show_uri_on_window

The gtk_show_uri API doesn't let us specify a parent window. With
portals, there may be an intermediate dialog, for which it is nice
to have parent window information, to place it properly.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoAdd a portal helper
Matthias Clasen [Tue, 5 Jul 2016 00:29:59 +0000 (20:29 -0400)]
Add a portal helper

Instead of open-coding checks for sandboxing in multiple
places, add a helper function that caches the information.

https://bugzilla.gnome.org/show_bug.cgi?id=768499

9 years agoChange the priority of the window-close idle to G_PRIORITY_DEFAULT
Owen W. Taylor [Wed, 6 Jul 2016 13:46:43 +0000 (09:46 -0400)]
Change the priority of the window-close idle to G_PRIORITY_DEFAULT

If we have an application that never goes idle (or takes a long time to
go idle), the close buttons in CSD decoration don't work properly.
While it's not clear why the usage of an idle was added in the first
place, keep on using it to avoid unexpected reentrancy problems, but
change the priority to G_PRIORITY_DEFAULT.

https://bugzilla.gnome.org/show_bug.cgi?id=768485

9 years agoAdd a css parser test for background-blend-mode
Matthias Clasen [Tue, 5 Jul 2016 17:16:43 +0000 (13:16 -0400)]
Add a css parser test for background-blend-mode

9 years agogtk3-demo: Simplify the blendmodes example a bit
Matthias Clasen [Mon, 4 Jul 2016 13:58:15 +0000 (09:58 -0400)]
gtk3-demo: Simplify the blendmodes example a bit

Just put all of the template into the resource.

9 years agowayland: remove unneeded statement
Olivier Fourdan [Wed, 29 Jun 2016 13:19:42 +0000 (15:19 +0200)]
wayland: remove unneeded statement

seat->pointer_info.focus is already set to NULL 2 lines above, no need to
repeat it there.

9 years agowayland: return child only in device_query_state()
Olivier Fourdan [Wed, 29 Jun 2016 13:08:06 +0000 (15:08 +0200)]
wayland: return child only in device_query_state()

On X11, device_query_state() uses XIQueryPointer() which will return a
child window only if the pointer is within an actual child of the given
window.

Wayland backend would return the pointer->focus window independently of
the given window, but that breaks the logic in get_device_state() and
later in gdk_window_get_device_position_double() because the window is
searched based on coordinates from another window without sibling
relationship, breaking gtkmenu sub-menus further down the line.

Fix the Wayland backend to mimic X11's XIQueryPointer() to return a
child only if really a child of the given window.

That's the most sensible thing to do to fix the issue, but the API here
seems to be modeled after the X11 implementation and the description of
gdk_window_get_device_position_double() is not entirely accurate.

https://bugzilla.gnome.org/show_bug.cgi?id=768016

9 years agoUpdated POTFILES.skip
Piotr Drąg [Sun, 3 Jul 2016 22:41:24 +0000 (00:41 +0200)]
Updated POTFILES.skip

9 years agogtk3-demo: Make blendmodes example non-resizable
Matthias Clasen [Sun, 3 Jul 2016 22:29:21 +0000 (18:29 -0400)]
gtk3-demo: Make blendmodes example non-resizable

It doesn't need to.

9 years agoFix parsing of some css properties
Matthias Clasen [Sun, 3 Jul 2016 21:54:19 +0000 (17:54 -0400)]
Fix parsing of some css properties

Our property parser stops at the first match when looking for
enums, so we need to order our values so that we don't end up
with prefixes of longer names being found first.

I noticed this when the parser tried to interpret
background-blend-mode: color-burn; as "color, with junk at the end".

It also affects animation-direction, which is also fixed here.

9 years agocss parser: Improve an error message
Matthias Clasen [Sun, 3 Jul 2016 21:46:30 +0000 (17:46 -0400)]
css parser: Improve an error message

Say what property we are dealing with when we complain about the
value.

9 years agodemo: add a demo for blend modes
Georges Basile Stavracas Neto [Fri, 1 Jul 2016 22:39:04 +0000 (19:39 -0300)]
demo: add a demo for blend modes

After introducing the CSS blend mode enum values and including
the background-blend-mode CSS property, it is very important to
actually provide an example of the new feature.

This patch adds a new demo to gtk3-demo which shows how the
background-blend-mode CSS property works.

https://bugzilla.gnome.org/show_bug.cgi?id=768305

9 years agocss: add documentation for background-blend-mode
Georges Basile Stavracas Neto [Fri, 1 Jul 2016 13:01:43 +0000 (10:01 -0300)]
css: add documentation for background-blend-mode

After introducing the new CSS property, it is natural to
add some documentation explaining the behavior of it and
our support coverage.

https://bugzilla.gnome.org/show_bug.cgi?id=768305

9 years agocss: add background-blend-mode support
Georges Basile Stavracas Neto [Fri, 1 Jul 2016 12:54:23 +0000 (09:54 -0300)]
css: add background-blend-mode support

CSS supports blend modes, in which a series of layers are
merged together according to the given operation or set of
operations.

Support for blend modes landed on Cairo, which exposes all
the commons and also the exquisites blend modes available.
Adding support for blend modes, then, is just a matter of
using the available Cairo operations.

This patch adds the background-blend-mode CSS enum property,
and adapts the background rendering code to blend the backgrounds
using the available blend modes when they're set.

https://bugzilla.gnome.org/show_bug.cgi?id=768305

9 years agoSimplify the xfce session manager support
Matthias Clasen [Sun, 3 Jul 2016 21:22:14 +0000 (17:22 -0400)]
Simplify the xfce session manager support

We don't have to check name owners twice; reuse the information
we already have.

9 years agoGtkApplication: Add support for the Xfce session manager
Eric Koegel [Tue, 28 Jun 2016 08:56:35 +0000 (11:56 +0300)]
GtkApplication: Add support for the Xfce session manager

Xfce4-session-manager added support for managing dbus based clients.
This patch adds support for checking if Xfce session manager is
around after trying the gnome one.
https://bugzilla.gnome.org/show_bug.cgi?id=693203

9 years agoFix example Makefiles
Matthias Clasen [Sun, 3 Jul 2016 17:54:11 +0000 (13:54 -0400)]
Fix example Makefiles

Put OBJS before LIBS on the commandline to make things
work better.

https://bugzilla.gnome.org/show_bug.cgi?id=768142

9 years agoprint dialog: Apply initial capabilities
Matthias Clasen [Sat, 2 Jul 2016 22:08:38 +0000 (18:08 -0400)]
print dialog: Apply initial capabilities

I was struggling to understand why calling
gtk_print_unix_dialog_set_manual_capabilities (...,0)
was not having the expected effect of hiding the preview
button. The initial capabilities were not applied at all.

9 years agowayland: Separate selection buffers and other per-selection atom data
Carlos Garnacho [Wed, 29 Jun 2016 15:13:55 +0000 (17:13 +0200)]
wayland: Separate selection buffers and other per-selection atom data

This has most notably impact in selection buffers, because those were
shared across all selection atoms. This turned out wrong on 2 situations:
- Because the selection atom was set at SelectionBuffer creation time, the
  GDK_SELECTION_NOTIFY events generated will have unexpected info if the
  buffer is attempted to be reused for another selection.
- Anytime different selections imply different stored content for the same
  target.

This is better separated into per-selection buffers, so it's not possible
to get collisions if a same target is used across different selections.

https://bugzilla.gnome.org/show_bug.cgi?id=768177

9 years agowayland: Implement gdk_utf8_to_string_target
Carlos Garnacho [Mon, 27 Jun 2016 09:57:21 +0000 (11:57 +0200)]
wayland: Implement gdk_utf8_to_string_target

The sanitize_utf8() function has been copied from X11 so both
backends behave the same. This allows interaction with older clients
(mainly through Xwayland, and the STRING selection target) that
request non-utf8 text.

https://bugzilla.gnome.org/show_bug.cgi?id=768082

9 years agogtk/gtkstylecascade.c: Fix formatting
Chun-wei Fan [Thu, 30 Jun 2016 10:00:47 +0000 (18:00 +0800)]
gtk/gtkstylecascade.c: Fix formatting

My previous patch on this file did not take into the account of the
formatting, sorry!

9 years agoheaderbar: don't throw a warning if title widget is hidden
Ray Strode [Wed, 29 Jun 2016 13:20:55 +0000 (09:20 -0400)]
headerbar: don't throw a warning if title widget is hidden

commit 0015ebc4a8f269f6888fcacef3e83e3167241d67 reworked
some of the titlebar size allocation code.  Those changes
inadvertently introduced a warning when the application sets
the headerbar title widget to be hidden.

This commit fixes that warning.

https://bugzilla.gnome.org/show_bug.cgi?id=768184

9 years agoconfigure: fix "AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS"
Ignacio Casal Quinteiro [Wed, 29 Jun 2016 13:14:00 +0000 (15:14 +0200)]
configure: fix "AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS"

9 years agogdk: actually fix the previous commit
Ignacio Casal Quinteiro [Wed, 29 Jun 2016 13:10:39 +0000 (15:10 +0200)]
gdk: actually fix the previous commit

We do not want it on windows

9 years agogdk: do not provide display command line argument on windows
Ignacio Casal Quinteiro [Wed, 29 Jun 2016 13:05:08 +0000 (15:05 +0200)]
gdk: do not provide display command line argument on windows

There is no need to specify a display on windows.

9 years agoGtkWindow: Check for GtkWidget-window-dragging in multipress gesture
Timm Bäder [Tue, 28 Jun 2016 18:54:25 +0000 (20:54 +0200)]
GtkWindow: Check for GtkWidget-window-dragging in multipress gesture

This partly reverts 9f5b9c0e075e2426d6627f867473e911fca0c7ae, which
removed the check for GtkWidget-window-dragging in the multipress
gesture. This check is still needed for widgets which have this style
property set (e.g. menubars and toolbars) can maximize the window on
double click -- but those widgets which have it set to FALSE shouldn't
maximize the window.

9 years agogtkfilesystem: Improve heuristics to detect remote filesystem
Ondrej Holy [Wed, 22 Jun 2016 12:04:00 +0000 (14:04 +0200)]
gtkfilesystem: Improve heuristics to detect remote filesystem

Use G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE to detect remote filesystems
instead of hardcoded list of filesystem types.

Bump required GLib version accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=767965

9 years agoGtkWindow: Fix dragging on non-titlebar widgets
Timm Bäder [Mon, 27 Jun 2016 17:23:12 +0000 (19:23 +0200)]
GtkWindow: Fix dragging on non-titlebar widgets

9 years agowidget: Don't unnecessarily export function
Timm Bäder [Sat, 11 Jun 2016 05:53:33 +0000 (07:53 +0200)]
widget: Don't unnecessarily export function

_gtk_widget_get_translation_to_window is only used in gtkwidget.c

9 years agogtk/gtkstylecascade.c: Declare variables at beginning of block
Chun-wei Fan [Mon, 27 Jun 2016 03:58:42 +0000 (11:58 +0800)]
gtk/gtkstylecascade.c: Declare variables at beginning of block

9 years agoFix build of commit f23e99b
Chun-wei Fan [Mon, 27 Jun 2016 03:53:30 +0000 (11:53 +0800)]
Fix build of commit f23e99b

Commit f23e99b made use of snprintf(), which is not universally available.
Fix this by using g_snprintf().

9 years agoUpdated Indonesian translation
Andika Triwidada [Sun, 26 Jun 2016 22:25:51 +0000 (22:25 +0000)]
Updated Indonesian translation

9 years agoUpdated Indonesian translation
Andika Triwidada [Sun, 26 Jun 2016 22:21:22 +0000 (22:21 +0000)]
Updated Indonesian translation
(cherry picked from commit 23673851b7e51c67a02f8171161b89111fec249b)

9 years agoUpdated Hebrew translation
Yosef Or Boczko [Sun, 26 Jun 2016 13:15:06 +0000 (16:15 +0300)]
Updated Hebrew translation

9 years agoAdwaita: color the selection of entries with error...
Lapo Calamandrei [Sat, 25 Jun 2016 16:29:51 +0000 (18:29 +0200)]
Adwaita: color the selection of entries with error...

...or warning style class applied.
This particular style bit wasn't converted to the saner 3.20 way
so `entry:selected` used in place of `entry selection`.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=768025

9 years agoAdwaita: restrict infobar styling to, well, infobars
Lapo Calamandrei [Sat, 25 Jun 2016 16:17:59 +0000 (18:17 +0200)]
Adwaita: restrict infobar styling to, well, infobars

we used to style infobars by using the .info, .question, .warning
and .error selectors directly, which used to be ok when we had just
styleclasses all over the place, now it needs to be more specific
or it interferes with everything with those styleclasses applied
like entries.

9 years agoUpdated Indonesian translation
Andika Triwidada [Sat, 25 Jun 2016 07:57:53 +0000 (07:57 +0000)]
Updated Indonesian translation

9 years agoUpdated Indonesian translation
Andika Triwidada [Sat, 25 Jun 2016 03:18:54 +0000 (03:18 +0000)]
Updated Indonesian translation
(cherry picked from commit 3abb9ffa917611e81cc4cb50b7ddd38879a49b8f)

9 years agoheaderbar: support expand property for children
Ray Strode [Fri, 24 Jun 2016 11:53:49 +0000 (07:53 -0400)]
headerbar: support expand property for children

The header bar currently ignores the expand property on its
children. This commit changes the code to honor that property.

It divvies up any free space and distributes it equally to packed
children (with any left over space given out a pixel at a time
on a first come, first serve basis).

This commit also adds support for the title widget to be made
expandable.

It accomplishes this by using up the padding the title widget
is centered with.

https://bugzilla.gnome.org/show_bug.cgi?id=724332

9 years agoheaderbar: compute nominal size of sides up front
Ray Strode [Fri, 24 Jun 2016 16:16:40 +0000 (12:16 -0400)]
headerbar: compute nominal size of sides up front

In order to support the expand property on children, we're
going to need to look at the size of the packed children
on each side of the title widget, up front, before allocating
them (to compute how much extra allocation each expanded child
gets).

This commit lays the groundwork for that analysis by splitting
the size calculation of each side of the header bar outside
of the loop that allocates each child of the header bar.

https://bugzilla.gnome.org/show_bug.cgi?id=724332

9 years agoheaderbar: simplify some size allocation code
Ray Strode [Fri, 24 Jun 2016 11:57:06 +0000 (07:57 -0400)]
headerbar: simplify some size allocation code

With a headerbar, the widget in the center may be a label, constructed
internally, or a custom widget, constructed externally.  The size
allocation code needs to handle either case the same way for the most
part.  There's more than one place in the code that checks which of
the two widgets to use and does some operation on the selected one.

This commit simplifies the code by checking up front which one is the
center (title) widget and storing that in a temporary variable,
This allows reducing duplicated logic later on in the function.

https://bugzilla.gnome.org/show_bug.cgi?id=724332

9 years agoheaderbar: simplify calculation in size allocation code
Ray Strode [Thu, 23 Jun 2016 20:31:24 +0000 (16:31 -0400)]
headerbar: simplify calculation in size allocation code

There's some extraneous MIN() calls that have predetermined answers.

This commit drops them and then simplifies a few redudant checks into
one MIN call.

https://bugzilla.gnome.org/show_bug.cgi?id=724332

9 years agoFix an array overrun
Matthias Clasen [Thu, 23 Jun 2016 19:46:45 +0000 (15:46 -0400)]
Fix an array overrun

When I introduced the new input source enum value for
track points, I forgot that there is a fixed-size array
with names for those in the inspector.

9 years agoheaderbar: don't use GTK_PACK_* as indices into array
Ray Strode [Thu, 23 Jun 2016 13:16:40 +0000 (09:16 -0400)]
headerbar: don't use GTK_PACK_* as indices into array

The size allocation code maintains an array of two elements,
to track the allocation of children packed into the two sides
of a header bar. Sometimes this array is indexed with 0 and 1,
and sometimes its indexed with GTK_PACK_START and GTK_PACK_END.
The latter happen to have the values 0 and 1, respectively, but
that's not really obvious.

For clarity, this commit changes the code to index those arrays
consistently, sticking to 0 and 1 across the board.

9 years agoheaderbar: don't allocate both label and custom title
Ray Strode [Thu, 23 Jun 2016 12:57:55 +0000 (08:57 -0400)]
headerbar: don't allocate both label and custom title

It's only possible to have a label or a custom title, not both.
The size allocate code confusingly treats them as independent.

That is confusing, because, as the code is written, it makes it
look like the space for the custom title isn't getting accounted
for.

This commit else-ifies some parts of the size allocate code for
clarity.

9 years agoUpdated Portuguese translation
Tiago Santos [Wed, 22 Jun 2016 13:12:03 +0000 (13:12 +0000)]
Updated Portuguese translation

9 years agogtk: Keep Firefox working in the DrawingContext world
Emmanuele Bassi [Wed, 22 Jun 2016 09:56:27 +0000 (10:56 +0100)]
gtk: Keep Firefox working in the DrawingContext world

Firefox does a bunch of interesting things with GTK.

If the top-level GtkWindow does not have a "csd" style class associated,
Firefox will happily draw the contents of the container used to render
HTML and XUL directly on the top level's GdkWindow; on the other hand,
if a "csd" style class is found, the MozContainer will create a new
child window, and draw on it.

Then, Firefox will proceed to disable double buffering on both the
top-level window and the MozContainer (unless they are backed by the
same GdkWindow, in which case only the top-level will be
single-buffered) *and* it will add a GDK_EXPOSURE_MASK flag to the
MozContainer events for good measure (even if this is only needed for
GTK+ 2.x).

After landing the GdkDrawingContext API in GdkWindow, GTK enabled
automatic double buffering on all top-level windows backed by a native
surface, ad most users of single buffering rely on child widgets instead
of top-levels, and we'd still like to have the same double buffering
behaviour for all top-levels on all backends. Obviously, with Firefox
disabling double buffering on the top-level window, the change broke
their drawing mechanism.

Ideally, Firefox could be fixed to not disable double buffering on the
top-level window when MozContainer has a separate GdkWindow — i.e. the
CSD case — but since we did introduce a slight change of behaviour in
fringe users of the GTK+ API, let's keep backwards compatibility with
the old code for a little while longer, and create an intermediate Cairo
context unbound from the GdkDrawingContext, like we used to do until
GTK+ 3.20.

9 years agoVisual Studio builds: Make .pc generation more flexible
Chun-wei Fan [Wed, 22 Jun 2016 07:16:09 +0000 (15:16 +0800)]
Visual Studio builds: Make .pc generation more flexible

Allow the use of ${exec_prefix} for libdir and includedir when passing
them in as arguments to the script.

9 years agoGtkColorEditor: Keep ref on pre-popup focus widget
Carlos Garnacho [Tue, 21 Jun 2016 11:57:20 +0000 (13:57 +0200)]
GtkColorEditor: Keep ref on pre-popup focus widget

And ensure it's still visible before returning the keyboard focus to it.
Because of the extra ref, add a dispose handler that will ensure the
ref is lost (by popping down), although this should be already ensured
through other paths (eg. when the popup widget loses visibility).

This fixes a possible crash in dispose paths, where we might be restoring
focus on an already destroyed widget, and at a time where, if the toplevel
is being itself disposed, no new focus should be set.

https://bugzilla.gnome.org/show_bug.cgi?id=767849

9 years agodemos: Simplify popovers demo
Carlos Garnacho [Tue, 21 Jun 2016 10:30:29 +0000 (12:30 +0200)]
demos: Simplify popovers demo

Don't do much unconventional stuff here. This is a demo, not a test.

https://bugzilla.gnome.org/show_bug.cgi?id=767851

9 years agoGtkPopover: Honor widget margins when calculating tail position
Carlos Garnacho [Tue, 21 Jun 2016 10:24:05 +0000 (12:24 +0200)]
GtkPopover: Honor widget margins when calculating tail position

If there are widget margins set, the whole popover will be displaced.
However the calculation of the tail position doesn't have this into
account, ending up with the tail being detached from the popover if
the margin grew too big.

We should not render the arrows invariably next to the GdkWindow edge,
but optionally displaced inside it depending on the widget margins.
Fixes the gtk3-demo "Popovers" demo case, whose GtkEntry popovers set
widget margins for some reason.

https://bugzilla.gnome.org/show_bug.cgi?id=767851

9 years agolistbox: short-circuit if no sort function is set
Christian Hergert [Mon, 20 Jun 2016 22:17:00 +0000 (15:17 -0700)]
listbox: short-circuit if no sort function is set

do_sort will crash if sort_func is not defined. Instead of adding a check
there in the hot path, just check for sort_func before invalidating the
sort of the underlying GSequence.

9 years ago3.21.3
Matthias Clasen [Mon, 20 Jun 2016 18:17:07 +0000 (14:17 -0400)]
3.21.3